package com.jxwifi.cloud.quickclean.mycenter;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;

import com.jxwifi.cloud.quickclean.R;
import com.jxwifi.cloud.quickclean.app.ClientBasicActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class AboutWeActivity extends ClientBasicActivity {

    private String mImgUrl = "https://kjb-oss.oss-cn-shenzhen.aliyuncs.com/3zlf6bcxabedu2vtm5gd.jpg";

    @Bind(R.id.lucky_web)
    WebView mLuckWeb;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_about_me);
        ButterKnife.bind(this);
        openEventBus();

        mLuckWeb.getSettings().setLoadWithOverviewMode(true);
        mLuckWeb.getSettings().setDefaultTextEncodingName("UTF-8");
        StringBuilder sb = new StringBuilder();
        sb.append("<link rel=\"stylesheet\" href=\"file:///android_asset/common.css\" type=\"text/css\"/> ");
        sb.append("<div class=\"touch-detail\">");
        sb.append("<img src=\"");
        sb.append(mImgUrl);
        sb.append("\"></img>");
        sb.append("</div>");

        mLuckWeb.loadDataWithBaseURL("about:blank", sb.toString(), "text/html", "utf-8", null);

        //Glide.with(mBaseContext).load("https://kjb-oss.oss-cn-shenzhen.aliyuncs.com/3zlf6bcxabedu2vtm5gd.jpg").into(mImgAboutWe);
    }

    @OnClick({R.id.rel_img_back_pressed})
    void clickCK(View v) {
        switch (v.getId()) {
            case R.id.rel_img_back_pressed:
                onBackPressed();
                break;
        }
    }
}
